/* ---------------------------- skins/indy/skin.js -------------------------- */
VED.skin.name = 'indy';
VED.skin.ua_editor = 'ie,iequirks,ie7,ie8';
VED.skin.ua_dialog = 'ie,iequirks,ie7,ie8,opera';

VED.skin.chameleon = function( editor, part ) {
   // Use this function just to avoid having to repeat all these rules on
   // several places of our template.
   function getLinearBackground( definition ) {
      return 'background:-moz-linear-gradient(' + definition + ');' + // FF3.6+
         'background:-webkit-linear-gradient(' + definition + ');' + // Chrome10+, Safari5.1+
         'background:-o-linear-gradient(' + definition + ');' + // Opera 11.10+
         'background:-ms-linear-gradient(' + definition + ');' + // IE10+
         'background:linear-gradient(' + definition + ');'; // W3C
   }

   var css;

   // The Chameleon feature is available for each VED instance,
   // independently. Because of this, we need to prefix all CSS selectors with
   // the unique class name of the instance.
   //
   // VED instances have a unique ID, which is used as class name into
   // the outer container of the editor UI (e.g. ".editor_1").
   var cssId = '.' + editor.id;

   // There are two main "parts" that need the be touched by the Chameleon
   // feature: "editor" and "panel".
   //
   // This is the main UI part, representing everything that is loaded in the
   // page that includes the VED instance. Note that the dialog styles are
   // also taken in consideration here.
   if( part == 'editor' ) {
      css = cssId + ' .ved_inner,' +
         cssId + ' .ved_dialog_tab {' +
            'background-color:$color;' +
            'background:-webkit-gradient(linear,0 -15,0 40,from(#fff),to($color));' +
            getLinearBackground( 'top,#fff -15px,$color 40px' ) +
         '}' +

         cssId + ' .ved_toolgroup {' +
            'background:-webkit-gradient(linear,0 0,0 100,from(#fff),to($color));' +
            getLinearBackground( 'top,#fff,$color 100px' ) +
         '}' +

         cssId + ' .ved_combo_button {' +
            'background:-webkit-gradient(linear, left bottom, left -100, from(#fff), to($color));' +
            getLinearBackground( 'bottom,#fff,$color 100px' ) +
         '}' +

         cssId + ' .ved_dialog_contents,' +
         cssId + ' .ved_dialog_footer {' +
            'background-color:$color !important;' +
         '}' +

         cssId + ' .ved_dialog_tab:hover,' +
         cssId + ' .ved_dialog_tab:active,' +
         cssId + ' .ved_dialog_tab:focus,' +
         cssId + ' .ved_dialog_tab_selected {' +
            'background-color:$color;' +
            'background-image:none;' +
         '}' +

         '';


   // The "panel" part is necessary because it represents contents of panels
   // used in the editor, like context-menus or the toolbar combos panels.
   // Those are loaded inside iframes, so this template is used there. Because
   // of this iframe isolation, we don't need to specify the editor id class
   // name in the rules selectors.
   //
   // The menu.css rules are usually the ones to be overriden here, while all
   // the rest is handled by the above "editor" part.
   } else if ( part == 'panel' ) {
      css = '.ved_menubutton_icon {' +
            'background-color:$color !important;' +
            'border-color:$color !important;' +
         '}' +

         '.ved_menubutton:hover .ved_menubutton_icon,' +
         '.ved_menubutton:focus .ved_menubutton_icon,' +
         '.ved_menubutton:active .ved_menubutton_icon {' +
            'background-color:$color !important;' +
            'border-color:$color !important;' +
         '}' +

         '.ved_menubutton:hover .ved_menubutton_label,' +
         '.ved_menubutton:focus .ved_menubutton_label,' +
         '.ved_menubutton:active .ved_menubutton_label {' +
            'background-color:$color !important;' +
         '}' +

         '.ved_menubutton_disabled:hover .ved_menubutton_label,' +
         '.ved_menubutton_disabled:focus .ved_menubutton_label,' +
         '.ved_menubutton_disabled:active .ved_menubutton_label {' +
            'background-color: transparent !important;' +
         '}' +

         '.ved_menubutton_disabled:hover .ved_menubutton_icon,' +
         '.ved_menubutton_disabled:focus .ved_menubutton_icon,' +
         '.ved_menubutton_disabled:active .ved_menubutton_icon {' +
            'background-color:$color !important;' +
            'border-color:$color !important;' +
         '}' +

         '.ved_menubutton_disabled .ved_menubutton_icon {' +
            'background-color:$color !important;' +
            'border-color:$color !important;' +
         '}' +

         '.ved_menuseparator {' +
            'background-color:$color !important;' +
         '}' +

         '.ved_menubutton:hover,' +
         '.ved_menubutton:focus,' +
         '.ved_menubutton:active {' +
            'background-color:$color !important;' +
         '}';
   }

   return css;
};

// %REMOVE_START%

// VED.on( 'instanceLoaded', function() {

(function() {
   VED.skinName = 'indy';
   
   // The available icons. This list must match the file names (without
   // extension) available inside the "icons" folder.
   var icons = ( 'about,anchor-rtl,anchor,bgcolor,bidiltr,bidirtl,blockh1,blockh2,blockh3,blockh4,blockh5,blockh6,blockquote,' +
      'bold,bulletedlist-rtl,bulletedlist,button,checkbox,copy-rtl,copy,' +
      'creatediv,cut-rtl,cut,docprops-rtl,docprops,find-rtl,find,flash,form,' +
      'hiddenfield,horizontalrule,icons,iframe,image,imagebutton,indent-rtl,' +
      'indent,italic,justifyblock,justifycenter,justifyleft,justifyright,' +
      'link,maximize,newpage-rtl,newpage,numberedlist-rtl,numberedlist,' +
      'oembed,outdent-rtl,outdent,pagebreak-rtl,pagebreak,paste-rtl,paste,' +
      'pastefromword-rtl,pastefromword,pastetext-rtl,pastetext,placeholder,preview-rtl,' +
      'preview,print,radio,redo-rtl,redo,removeformat,replace,save,scayt,' +
      'select-rtl,select,selectall,showblocks-rtl,showblocks,smiley,' +
      'source-rtl,source,specialchar,spellchecker,strike,subscript,' +
      'superscript,table,templates-rtl,templates,textarea-rtl,textarea,' +
      'textcolor,textfield,underline,undo-rtl,undo,unlink' ).split( ',' );

   // var iconsFolder = VED.getUrl( VED.skin.path() + 'icons/' );
   var iconsFolder = VED.getUrl( '../i/ved/icons/' );

   for ( var i = 0; i < icons.length; i++ ) {
      VED.skin.addIcon( icons[ i ], iconsFolder + icons[ i ] + '.png' );
   }
})();

// });

// %REMOVE_END%





